<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta http-equiv="cache-control" content="no-cache">
<title>Genivia - HTTP cookie functions</title>
<link href="genivia_tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="genivia_content.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="top">
 <div id="titlearea">
  <table height="72px" width="100%" cellspacing="0" cellpadding="0">
   <tbody>
    <tr>
     <td width="10%">&nbsp;</td>
     <td width="175px"><a href="https://www.genivia.com"><img alt="Genivia" src="GeniviaLogo2_trans_noslogan.png"/></a></td>
     <td class="tab_home"><a href="https://www.genivia.com">Home</a></td>
     <td class="tab_home"><a href="https://www.genivia.com/docs.html">Documentation</a></td>
     <td>
      <div style="float: right; font-size: 18px; font-weight: bold;">HTTP cookie functions</div>
      <br>
      <div style="float: right; font-size: 10px;">updated Tue Apr 20 2021 by Robert van Engelen</div>
     </td>
     <td width="10%">&nbsp;</td>
    </tr>
   </tbody>
  </table>
 </div>
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__group__cookies.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">HTTP cookie functions</div>  </div>
</div><!--header-->
<div class="contents">

<p>This module defines functions to set and get HTTP cookies at the server side.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsoap__cookie.html">soap_cookie</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Cookie structure.  <a href="structsoap__cookie.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga7d5b0588ea763e511772f0cc2498e322"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="structsoap__cookie.html">soap_cookie</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__cookies.html#ga7d5b0588ea763e511772f0cc2498e322">soap_set_cookie</a> (struct <a class="el" href="structsoap.html">soap</a> *<a class="el" href="structsoap.html">soap</a>, const char *name, const char *value, const char *domain, const char *path)</td></tr>
<tr class="memdesc:ga7d5b0588ea763e511772f0cc2498e322"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a cookie.  <a href="#ga7d5b0588ea763e511772f0cc2498e322">More...</a><br /></td></tr>
<tr class="separator:ga7d5b0588ea763e511772f0cc2498e322"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae22594f7ccdd5476bcdd93626b3006ef"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__cookies.html#gae22594f7ccdd5476bcdd93626b3006ef">soap_set_cookie_expire</a> (struct <a class="el" href="structsoap.html">soap</a> *<a class="el" href="structsoap.html">soap</a>, const char *name, long maxage, const char *domain, const char *path)</td></tr>
<tr class="memdesc:gae22594f7ccdd5476bcdd93626b3006ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set cookie expiration.  <a href="#gae22594f7ccdd5476bcdd93626b3006ef">More...</a><br /></td></tr>
<tr class="separator:gae22594f7ccdd5476bcdd93626b3006ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac7ecc82a09c396a50c56ce801662de71"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__cookies.html#gac7ecc82a09c396a50c56ce801662de71">soap_set_cookie_secure</a> (struct <a class="el" href="structsoap.html">soap</a> *<a class="el" href="structsoap.html">soap</a>, const char *name, const char *domain, const char *path)</td></tr>
<tr class="memdesc:gac7ecc82a09c396a50c56ce801662de71"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set cookie secure.  <a href="#gac7ecc82a09c396a50c56ce801662de71">More...</a><br /></td></tr>
<tr class="separator:gac7ecc82a09c396a50c56ce801662de71"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5f7d712b3d1c7c2a09741aa45621dfb5"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__cookies.html#ga5f7d712b3d1c7c2a09741aa45621dfb5">soap_set_cookie_session</a> (struct <a class="el" href="structsoap.html">soap</a> *<a class="el" href="structsoap.html">soap</a>, const char *name, const char *domain, const char *path)</td></tr>
<tr class="memdesc:ga5f7d712b3d1c7c2a09741aa45621dfb5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set session cookie.  <a href="#ga5f7d712b3d1c7c2a09741aa45621dfb5">More...</a><br /></td></tr>
<tr class="separator:ga5f7d712b3d1c7c2a09741aa45621dfb5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac6b00dc725a0e74cf0342070151da94f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__cookies.html#gac6b00dc725a0e74cf0342070151da94f">soap_clr_cookie</a> (struct <a class="el" href="structsoap.html">soap</a> *<a class="el" href="structsoap.html">soap</a>, const char *name, const char *domain, const char *path)</td></tr>
<tr class="memdesc:gac6b00dc725a0e74cf0342070151da94f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear cookie.  <a href="#gac6b00dc725a0e74cf0342070151da94f">More...</a><br /></td></tr>
<tr class="separator:gac6b00dc725a0e74cf0342070151da94f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga760df00c0998efaeaddc39e401f3e168"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__cookies.html#ga760df00c0998efaeaddc39e401f3e168">soap_clr_cookie_session</a> (struct <a class="el" href="structsoap.html">soap</a> *<a class="el" href="structsoap.html">soap</a>, const char *name, const char *domain, const char *path)</td></tr>
<tr class="memdesc:ga760df00c0998efaeaddc39e401f3e168"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear session cookie.  <a href="#ga760df00c0998efaeaddc39e401f3e168">More...</a><br /></td></tr>
<tr class="separator:ga760df00c0998efaeaddc39e401f3e168"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabbc3a19d40bc8f3c2aed3c719e0569e9"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="structsoap__cookie.html">soap_cookie</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__cookies.html#gabbc3a19d40bc8f3c2aed3c719e0569e9">soap_cookie</a> (struct <a class="el" href="structsoap.html">soap</a> *<a class="el" href="structsoap.html">soap</a>, const char *name, const char *domain, const char *path)</td></tr>
<tr class="memdesc:gabbc3a19d40bc8f3c2aed3c719e0569e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Find a cookie.  <a href="#gabbc3a19d40bc8f3c2aed3c719e0569e9">More...</a><br /></td></tr>
<tr class="separator:gabbc3a19d40bc8f3c2aed3c719e0569e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0dd82c4fd7b499208d2402b195a182fe"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__cookies.html#ga0dd82c4fd7b499208d2402b195a182fe">soap_cookie_value</a> (struct <a class="el" href="structsoap.html">soap</a> *<a class="el" href="structsoap.html">soap</a>, const char *name, const char *domain, const char *path)</td></tr>
<tr class="memdesc:ga0dd82c4fd7b499208d2402b195a182fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get cookie value.  <a href="#ga0dd82c4fd7b499208d2402b195a182fe">More...</a><br /></td></tr>
<tr class="separator:ga0dd82c4fd7b499208d2402b195a182fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaac3464da4691fe86b2421bafecee0b6d"><td class="memItemLeft" align="right" valign="top">time_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__cookies.html#gaac3464da4691fe86b2421bafecee0b6d">soap_cookie_expire</a> (struct <a class="el" href="structsoap.html">soap</a> *<a class="el" href="structsoap.html">soap</a>, const char *name, const char *domain, const char *path)</td></tr>
<tr class="memdesc:gaac3464da4691fe86b2421bafecee0b6d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get cookie expiration.  <a href="#gaac3464da4691fe86b2421bafecee0b6d">More...</a><br /></td></tr>
<tr class="separator:gaac3464da4691fe86b2421bafecee0b6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7e55b641c3a3d6f9710b523e41917fe8"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__cookies.html#ga7e55b641c3a3d6f9710b523e41917fe8">soap_getenv_cookies</a> (struct <a class="el" href="structsoap.html">soap</a> *<a class="el" href="structsoap.html">soap</a>)</td></tr>
<tr class="memdesc:ga7e55b641c3a3d6f9710b523e41917fe8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get cookies from the <code>HTTP_COOKIE</code> environment variable.  <a href="#ga7e55b641c3a3d6f9710b523e41917fe8">More...</a><br /></td></tr>
<tr class="separator:ga7e55b641c3a3d6f9710b523e41917fe8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacf59ec191a3c7012dd6171f7db3d2c6b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__cookies.html#gacf59ec191a3c7012dd6171f7db3d2c6b">soap_free_cookies</a> (struct <a class="el" href="structsoap.html">soap</a> *<a class="el" href="structsoap.html">soap</a>)</td></tr>
<tr class="memdesc:gacf59ec191a3c7012dd6171f7db3d2c6b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Free cookies.  <a href="#gacf59ec191a3c7012dd6171f7db3d2c6b">More...</a><br /></td></tr>
<tr class="separator:gacf59ec191a3c7012dd6171f7db3d2c6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>This module defines functions to set and get HTTP cookies at the server side. </p>
<p>This module defines the cookie structure of cookies stored in the cookie store and server-side functions to set and inspect cookies. Cookie handling is fully automatic on the client side, when the engine is compiled with <code><a class="el" href="group__group__with.html#ga77f061a12d88eb8b7dae8b07cf90e29d" title="When this macro is defined at compile time (undefined by default), HTTP cookie support is enabled in ...">WITH_COOKIES</a></code>. To avoid "cookie storms" caused by malicious servers that return an unreasonable amount of cookies, the size of the cookie store is limited to <code><a class="el" href="structsoap.html#a44bd7fc8ba08b1dec2f08299d7f723dd" title="User-definable maximum number of active cookies allowed to be set with soap_set_cookie before cookie ...">soap::cookie_max</a></code> cookies. Each <code><a class="el" href="structsoap.html" title="Context with the engine state. ">soap</a></code> context has its own independent cookie store.</p>
<p>To enable HTTP cookies, the engine must be compiled with <code><a class="el" href="group__group__with.html#ga77f061a12d88eb8b7dae8b07cf90e29d" title="When this macro is defined at compile time (undefined by default), HTTP cookie support is enabled in ...">WITH_COOKIES</a></code>.</p>
<dl class="section see"><dt>See also</dt><dd>The <a href="../../sessions/html/index.html">HTTP Server Session Management plugin</a> documentation to use the HTTP session plugin to store a database of sessions to keep track of client data across multiple requests. </dd></dl>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gac6b00dc725a0e74cf0342070151da94f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void soap_clr_cookie </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structsoap.html">soap</a> *&#160;</td>
          <td class="paramname"><em>soap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>domain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Clear cookie. </p>
<p>This function deletes the specified cookie <code>name</code> from the cookie store at the server side. The <code>domain</code> and <code>path</code> parameters can be specified or can be NULL to use the current domain and path given by <code><a class="el" href="structsoap.html#af2ecfbae740da7839a0c5c96eb65db2a" title="User-definable string that specifies the HTTP cookie domain of the running server. ">soap::cookie_domain</a></code> and <code><a class="el" href="structsoap.html#afdd91ce1189fedd32ebfa51dd6ed33eb" title="User-definable string that specifies the HTTP cookie path of the running server. ">soap::cookie_path</a></code>.</p>
<p>To enable HTTP cookies, the engine must be compiled with <code><a class="el" href="group__group__with.html#ga77f061a12d88eb8b7dae8b07cf90e29d" title="When this macro is defined at compile time (undefined by default), HTTP cookie support is enabled in ...">WITH_COOKIES</a></code>.</p>
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="structsoap.html#af2ecfbae740da7839a0c5c96eb65db2a" title="User-definable string that specifies the HTTP cookie domain of the running server. ">soap::cookie_domain</a></code>, <code><a class="el" href="structsoap.html#afdd91ce1189fedd32ebfa51dd6ed33eb" title="User-definable string that specifies the HTTP cookie path of the running server. ">soap::cookie_path</a></code>. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">soap</td><td><code><a class="el" href="structsoap.html" title="Context with the engine state. ">soap</a></code> context </td></tr>
    <tr><td class="paramname">name</td><td>cookie name </td></tr>
    <tr><td class="paramname">domain</td><td>cookie domain or NULL </td></tr>
    <tr><td class="paramname">path</td><td>cookie path or NULL </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga760df00c0998efaeaddc39e401f3e168"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int soap_clr_cookie_session </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structsoap.html">soap</a> *&#160;</td>
          <td class="paramname"><em>soap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>domain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Clear session cookie. </p>
<p>This function clears the session property of the specified cookie <code>name</code> and updates the cookie store at the server side. The <code>domain</code> and <code>path</code> parameters can be specified or can be NULL to use the current domain and path given by <code><a class="el" href="structsoap.html#af2ecfbae740da7839a0c5c96eb65db2a" title="User-definable string that specifies the HTTP cookie domain of the running server. ">soap::cookie_domain</a></code> and <code><a class="el" href="structsoap.html#afdd91ce1189fedd32ebfa51dd6ed33eb" title="User-definable string that specifies the HTTP cookie path of the running server. ">soap::cookie_path</a></code>. Returns <code><a class="el" href="group__group__errors.html#ga3b10a68f354f39cbb0fe0d043ad4c7c0" title="The soap_status code for no error (zero) ">SOAP_OK</a></code> or a <code><a class="el" href="group__group__errors.html#gac0eadf8f72bacb5b41b750beaeca0444" title="Status and error codes are int values, a zero value or SOAP_OK (0) means no error, nonzero means error. ">soap_status</a></code> error code.</p>
<p>To enable HTTP cookies, the engine must be compiled with <code><a class="el" href="group__group__with.html#ga77f061a12d88eb8b7dae8b07cf90e29d" title="When this macro is defined at compile time (undefined by default), HTTP cookie support is enabled in ...">WITH_COOKIES</a></code>.</p>
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="structsoap.html#af2ecfbae740da7839a0c5c96eb65db2a" title="User-definable string that specifies the HTTP cookie domain of the running server. ">soap::cookie_domain</a></code>, <code><a class="el" href="structsoap.html#afdd91ce1189fedd32ebfa51dd6ed33eb" title="User-definable string that specifies the HTTP cookie path of the running server. ">soap::cookie_path</a></code>.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd><code><a class="el" href="group__group__errors.html#ga3b10a68f354f39cbb0fe0d043ad4c7c0" title="The soap_status code for no error (zero) ">SOAP_OK</a></code> or a <code><a class="el" href="group__group__errors.html#gac0eadf8f72bacb5b41b750beaeca0444" title="Status and error codes are int values, a zero value or SOAP_OK (0) means no error, nonzero means error. ">soap_status</a></code> error code </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">soap</td><td><code><a class="el" href="structsoap.html" title="Context with the engine state. ">soap</a></code> context </td></tr>
    <tr><td class="paramname">name</td><td>cookie name </td></tr>
    <tr><td class="paramname">domain</td><td>cookie domain or NULL </td></tr>
    <tr><td class="paramname">path</td><td>cookie path or NULL </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gabbc3a19d40bc8f3c2aed3c719e0569e9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structsoap__cookie.html">soap_cookie</a>* <a class="el" href="structsoap__cookie.html">soap_cookie</a> </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structsoap.html">soap</a> *&#160;</td>
          <td class="paramname"><em>soap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>domain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Find a cookie. </p>
<p>This function returns the cookie structure of the specified cookie <code>name</code> or NULL when not found by searching the cookie store at the server side. The <code>domain</code> and <code>path</code> parameters can be specified or can be NULL to use the current domain and path given by <code><a class="el" href="structsoap.html#af2ecfbae740da7839a0c5c96eb65db2a" title="User-definable string that specifies the HTTP cookie domain of the running server. ">soap::cookie_domain</a></code> and <code><a class="el" href="structsoap.html#afdd91ce1189fedd32ebfa51dd6ed33eb" title="User-definable string that specifies the HTTP cookie path of the running server. ">soap::cookie_path</a></code>.</p>
<p>To enable HTTP cookies, the engine must be compiled with <code><a class="el" href="group__group__with.html#ga77f061a12d88eb8b7dae8b07cf90e29d" title="When this macro is defined at compile time (undefined by default), HTTP cookie support is enabled in ...">WITH_COOKIES</a></code>.</p>
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="structsoap.html#af2ecfbae740da7839a0c5c96eb65db2a" title="User-definable string that specifies the HTTP cookie domain of the running server. ">soap::cookie_domain</a></code>, <code><a class="el" href="structsoap.html#afdd91ce1189fedd32ebfa51dd6ed33eb" title="User-definable string that specifies the HTTP cookie path of the running server. ">soap::cookie_path</a></code>.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>pointer to a <code><a class="el" href="structsoap__cookie.html" title="Cookie structure. ">soap_cookie</a></code> structure or NULL when not found </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">soap</td><td><code><a class="el" href="structsoap.html" title="Context with the engine state. ">soap</a></code> context </td></tr>
    <tr><td class="paramname">name</td><td>cookie name </td></tr>
    <tr><td class="paramname">domain</td><td>cookie domain or NULL </td></tr>
    <tr><td class="paramname">path</td><td>cookie path or NULL </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaac3464da4691fe86b2421bafecee0b6d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">time_t soap_cookie_expire </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structsoap.html">soap</a> *&#160;</td>
          <td class="paramname"><em>soap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>domain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get cookie expiration. </p>
<p>This function returns the cookie expiration time <code>time_t</code> of the specified cookie <code>name</code> or -1 when not found by searching the cookie store at the server side. The <code>domain</code> and <code>path</code> parameters can be specified or can be NULL to use the current domain and path given by <code><a class="el" href="structsoap.html#af2ecfbae740da7839a0c5c96eb65db2a" title="User-definable string that specifies the HTTP cookie domain of the running server. ">soap::cookie_domain</a></code> and <code><a class="el" href="structsoap.html#afdd91ce1189fedd32ebfa51dd6ed33eb" title="User-definable string that specifies the HTTP cookie path of the running server. ">soap::cookie_path</a></code>.</p>
<p>To enable HTTP cookies, the engine must be compiled with <code><a class="el" href="group__group__with.html#ga77f061a12d88eb8b7dae8b07cf90e29d" title="When this macro is defined at compile time (undefined by default), HTTP cookie support is enabled in ...">WITH_COOKIES</a></code>.</p>
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="structsoap.html#af2ecfbae740da7839a0c5c96eb65db2a" title="User-definable string that specifies the HTTP cookie domain of the running server. ">soap::cookie_domain</a></code>, <code><a class="el" href="structsoap.html#afdd91ce1189fedd32ebfa51dd6ed33eb" title="User-definable string that specifies the HTTP cookie path of the running server. ">soap::cookie_path</a></code>.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>cookie expiration time </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">soap</td><td><code><a class="el" href="structsoap.html" title="Context with the engine state. ">soap</a></code> context </td></tr>
    <tr><td class="paramname">name</td><td>cookie name </td></tr>
    <tr><td class="paramname">domain</td><td>cookie domain or NULL </td></tr>
    <tr><td class="paramname">path</td><td>cookie path or NULL </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga0dd82c4fd7b499208d2402b195a182fe"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* soap_cookie_value </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structsoap.html">soap</a> *&#160;</td>
          <td class="paramname"><em>soap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>domain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get cookie value. </p>
<p>This function returns the cookie value of the specified cookie <code>name</code> or NULL when not found by searching the cookie store at the server side. The <code>domain</code> and <code>path</code> parameters can be specified or can be NULL to use the current domain and path given by <code><a class="el" href="structsoap.html#af2ecfbae740da7839a0c5c96eb65db2a" title="User-definable string that specifies the HTTP cookie domain of the running server. ">soap::cookie_domain</a></code> and <code><a class="el" href="structsoap.html#afdd91ce1189fedd32ebfa51dd6ed33eb" title="User-definable string that specifies the HTTP cookie path of the running server. ">soap::cookie_path</a></code>.</p>
<p>To enable HTTP cookies, the engine must be compiled with <code><a class="el" href="group__group__with.html#ga77f061a12d88eb8b7dae8b07cf90e29d" title="When this macro is defined at compile time (undefined by default), HTTP cookie support is enabled in ...">WITH_COOKIES</a></code>.</p>
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="structsoap.html#af2ecfbae740da7839a0c5c96eb65db2a" title="User-definable string that specifies the HTTP cookie domain of the running server. ">soap::cookie_domain</a></code>, <code><a class="el" href="structsoap.html#afdd91ce1189fedd32ebfa51dd6ed33eb" title="User-definable string that specifies the HTTP cookie path of the running server. ">soap::cookie_path</a></code>.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>cookie value or NULL when not found </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">soap</td><td><code><a class="el" href="structsoap.html" title="Context with the engine state. ">soap</a></code> context </td></tr>
    <tr><td class="paramname">name</td><td>cookie name </td></tr>
    <tr><td class="paramname">domain</td><td>cookie domain or NULL </td></tr>
    <tr><td class="paramname">path</td><td>cookie path or NULL </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gacf59ec191a3c7012dd6171f7db3d2c6b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void soap_free_cookies </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structsoap.html">soap</a> *&#160;</td>
          <td class="paramname"><em>soap</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Free cookies. </p>
<p>This function frees the cookie store and deletes all cookies.</p>
<p>To enable HTTP cookies, the engine must be compiled with <code><a class="el" href="group__group__with.html#ga77f061a12d88eb8b7dae8b07cf90e29d" title="When this macro is defined at compile time (undefined by default), HTTP cookie support is enabled in ...">WITH_COOKIES</a></code>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">soap</td><td><code><a class="el" href="structsoap.html" title="Context with the engine state. ">soap</a></code> context </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga7e55b641c3a3d6f9710b523e41917fe8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int soap_getenv_cookies </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structsoap.html">soap</a> *&#160;</td>
          <td class="paramname"><em>soap</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get cookies from the <code>HTTP_COOKIE</code> environment variable. </p>
<p>This function initializes the cookie store at the server side by reading the <code>HTTP_COOKIE</code> environment variable. This provides a means for a CGI application to read cookies sent by a client. Returns <code><a class="el" href="group__group__errors.html#ga3b10a68f354f39cbb0fe0d043ad4c7c0" title="The soap_status code for no error (zero) ">SOAP_OK</a></code> or a <code><a class="el" href="group__group__errors.html#gac0eadf8f72bacb5b41b750beaeca0444" title="Status and error codes are int values, a zero value or SOAP_OK (0) means no error, nonzero means error. ">soap_status</a></code> error code when the <code>HTTP_COOKIE</code> variable was not found.</p>
<p>To enable HTTP cookies, the engine must be compiled with <code><a class="el" href="group__group__with.html#ga77f061a12d88eb8b7dae8b07cf90e29d" title="When this macro is defined at compile time (undefined by default), HTTP cookie support is enabled in ...">WITH_COOKIES</a></code>.</p><dl class="section return"><dt>Returns</dt><dd><code><a class="el" href="group__group__errors.html#ga3b10a68f354f39cbb0fe0d043ad4c7c0" title="The soap_status code for no error (zero) ">SOAP_OK</a></code> or a <code><a class="el" href="group__group__errors.html#gac0eadf8f72bacb5b41b750beaeca0444" title="Status and error codes are int values, a zero value or SOAP_OK (0) means no error, nonzero means error. ">soap_status</a></code> error code </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">soap</td><td><code><a class="el" href="structsoap.html" title="Context with the engine state. ">soap</a></code> context </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga7d5b0588ea763e511772f0cc2498e322"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structsoap__cookie.html">soap_cookie</a>* soap_set_cookie </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structsoap.html">soap</a> *&#160;</td>
          <td class="paramname"><em>soap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>domain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Add a cookie. </p>
<p>This function adds a cookie to the cookie store at the server side, if not already there, with the specified <code>name</code> and <code>value</code>. The <code>domain</code> and <code>path</code> parameters can be specified or can be NULL to use the current domain and path given by <code><a class="el" href="structsoap.html#af2ecfbae740da7839a0c5c96eb65db2a" title="User-definable string that specifies the HTTP cookie domain of the running server. ">soap::cookie_domain</a></code> and <code><a class="el" href="structsoap.html#afdd91ce1189fedd32ebfa51dd6ed33eb" title="User-definable string that specifies the HTTP cookie path of the running server. ">soap::cookie_path</a></code>. Returns pointer to the cookie structure in the database or NULL when an error occurred.</p>
<dl class="section user"><dt>Example:</dt><dd></dd></dl>
<div class="fragment"><div class="line"><span class="comment">// A CGI service with `::soap_serve` function generated by soapcpp2 from an interface file declaring a ns__webmethod function</span></div><div class="line"><span class="preprocessor">#include &quot;soapH.h&quot;</span></div><div class="line"></div><div class="line"><span class="keywordtype">int</span> main()</div><div class="line">{</div><div class="line">  <span class="keyword">struct </span>soap *soap = <a class="code" href="group__group__context.html#ga87c20488b2dc680aaa7689b1d024989c">soap_new</a>();</div><div class="line">  soap-&gt;<a class="code" href="structsoap.html#af2ecfbae740da7839a0c5c96eb65db2a">cookie_domain</a> = <span class="stringliteral">&quot;example.com&quot;</span>;</div><div class="line">  soap-&gt;<a class="code" href="structsoap.html#afdd91ce1189fedd32ebfa51dd6ed33eb">cookie_path</a> = <span class="stringliteral">&quot;/&quot;</span>;</div><div class="line">  <a class="code" href="group__group__cookies.html#ga7e55b641c3a3d6f9710b523e41917fe8">soap_getenv_cookies</a>(soap);</div><div class="line">  <span class="keywordflow">return</span> <a class="code" href="group__group__io.html#ga51dba7706a505240bd8935c0b28e419d">soap_serve</a>(soap);</div><div class="line">}</div><div class="line"><span class="comment">// Define a ns__webmethod service operation with parameters that uses HTTP cookies to control state</span></div><div class="line"><span class="keywordtype">int</span> ns__webmethod(<span class="keyword">struct</span> soap *soap, ...)</div><div class="line">{</div><div class="line">  <span class="keyword">const</span> <span class="keywordtype">char</span> *cookie_value = <a class="code" href="group__group__cookies.html#ga0dd82c4fd7b499208d2402b195a182fe">soap_cookie_value</a>(soap, <span class="stringliteral">&quot;cookie_name&quot;</span>, NULL, NULL);</div><div class="line">  <span class="keywordflow">if</span> (cookie_value)</div><div class="line">    ... <span class="comment">// modify the cookie value to advance the state of this (otherwise stateless CGI) service</span></div><div class="line">  <span class="keywordflow">else</span></div><div class="line">    cookie_value = <span class="stringliteral">&quot;initial_value&quot;</span>;</div><div class="line">  <a class="code" href="group__group__cookies.html#ga7d5b0588ea763e511772f0cc2498e322">soap_set_cookie</a>(soap, <span class="stringliteral">&quot;cookie_name&quot;</span>, cookie_value, NULL, NULL);</div><div class="line">  <a class="code" href="group__group__cookies.html#gae22594f7ccdd5476bcdd93626b3006ef">soap_set_cookie_expire</a>(soap, <span class="stringliteral">&quot;cookie_name&quot;</span>, 60, NULL, NULL); <span class="comment">// cookie expires in 60 seconds</span></div><div class="line">  ... <span class="comment">// other webmethod logic</span></div><div class="line">  <span class="keywordflow">return</span> <a class="code" href="group__group__errors.html#ga3b10a68f354f39cbb0fe0d043ad4c7c0">SOAP_OK</a>;</div><div class="line">}</div></div><!-- fragment --><p>To enable HTTP cookies, the engine must be compiled with <code><a class="el" href="group__group__with.html#ga77f061a12d88eb8b7dae8b07cf90e29d" title="When this macro is defined at compile time (undefined by default), HTTP cookie support is enabled in ...">WITH_COOKIES</a></code>.</p>
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="structsoap.html#af2ecfbae740da7839a0c5c96eb65db2a" title="User-definable string that specifies the HTTP cookie domain of the running server. ">soap::cookie_domain</a></code>, <code><a class="el" href="structsoap.html#afdd91ce1189fedd32ebfa51dd6ed33eb" title="User-definable string that specifies the HTTP cookie path of the running server. ">soap::cookie_path</a></code>, <code><a class="el" href="structsoap.html#a44bd7fc8ba08b1dec2f08299d7f723dd" title="User-definable maximum number of active cookies allowed to be set with soap_set_cookie before cookie ...">soap::cookie_max</a></code>.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>pointer to cookie or NULL when an error occurred </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">soap</td><td><code><a class="el" href="structsoap.html" title="Context with the engine state. ">soap</a></code> context </td></tr>
    <tr><td class="paramname">name</td><td>cookie name </td></tr>
    <tr><td class="paramname">value</td><td>cookie value to set </td></tr>
    <tr><td class="paramname">domain</td><td>cookie domain or NULL </td></tr>
    <tr><td class="paramname">path</td><td>cookie path or NULL </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gae22594f7ccdd5476bcdd93626b3006ef"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int soap_set_cookie_expire </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structsoap.html">soap</a> *&#160;</td>
          <td class="paramname"><em>soap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>maxage</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>domain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set cookie expiration. </p>
<p>This function sets the expiration of the specified cookie <code>name</code> in seconds and updates the cookie store at the server side. The <code>domain</code> and <code>path</code> parameters can be specified or can be NULL to use the current domain and path given by <code><a class="el" href="structsoap.html#af2ecfbae740da7839a0c5c96eb65db2a" title="User-definable string that specifies the HTTP cookie domain of the running server. ">soap::cookie_domain</a></code> and <code><a class="el" href="structsoap.html#afdd91ce1189fedd32ebfa51dd6ed33eb" title="User-definable string that specifies the HTTP cookie path of the running server. ">soap::cookie_path</a></code>. Returns <code><a class="el" href="group__group__errors.html#ga3b10a68f354f39cbb0fe0d043ad4c7c0" title="The soap_status code for no error (zero) ">SOAP_OK</a></code> or a <code><a class="el" href="group__group__errors.html#gac0eadf8f72bacb5b41b750beaeca0444" title="Status and error codes are int values, a zero value or SOAP_OK (0) means no error, nonzero means error. ">soap_status</a></code> error code.</p>
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="structsoap.html#af2ecfbae740da7839a0c5c96eb65db2a" title="User-definable string that specifies the HTTP cookie domain of the running server. ">soap::cookie_domain</a></code>, <code><a class="el" href="structsoap.html#afdd91ce1189fedd32ebfa51dd6ed33eb" title="User-definable string that specifies the HTTP cookie path of the running server. ">soap::cookie_path</a></code>.</dd></dl>
<p>To enable HTTP cookies, the engine must be compiled with <code><a class="el" href="group__group__with.html#ga77f061a12d88eb8b7dae8b07cf90e29d" title="When this macro is defined at compile time (undefined by default), HTTP cookie support is enabled in ...">WITH_COOKIES</a></code>.</p><dl class="section return"><dt>Returns</dt><dd><code><a class="el" href="group__group__errors.html#ga3b10a68f354f39cbb0fe0d043ad4c7c0" title="The soap_status code for no error (zero) ">SOAP_OK</a></code> or a <code><a class="el" href="group__group__errors.html#gac0eadf8f72bacb5b41b750beaeca0444" title="Status and error codes are int values, a zero value or SOAP_OK (0) means no error, nonzero means error. ">soap_status</a></code> error code </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">soap</td><td><code><a class="el" href="structsoap.html" title="Context with the engine state. ">soap</a></code> context </td></tr>
    <tr><td class="paramname">name</td><td>cookie name </td></tr>
    <tr><td class="paramname">maxage</td><td>the age to live in seconds </td></tr>
    <tr><td class="paramname">domain</td><td>cookie domain or NULL </td></tr>
    <tr><td class="paramname">path</td><td>cookie path or NULL </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gac7ecc82a09c396a50c56ce801662de71"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int soap_set_cookie_secure </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structsoap.html">soap</a> *&#160;</td>
          <td class="paramname"><em>soap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>domain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set cookie secure. </p>
<p>This function sets the "secure" property of the specified cookie <code>name</code> and updates the cookie store at the server side. The "secure" property means that this cookie should be sent by the client to the server only when a secure HTTPS connection can be established. When HTTPS is enabled all cookies are sent by the server to the client with the "secure" property set, which means that this function is generally not needed unless the server is not HTTPS-enabled but cookies must be secure. The <code>domain</code> and <code>path</code> parameters can be specified or can be NULL to use the current domain and path given by <code><a class="el" href="structsoap.html#af2ecfbae740da7839a0c5c96eb65db2a" title="User-definable string that specifies the HTTP cookie domain of the running server. ">soap::cookie_domain</a></code> and <code><a class="el" href="structsoap.html#afdd91ce1189fedd32ebfa51dd6ed33eb" title="User-definable string that specifies the HTTP cookie path of the running server. ">soap::cookie_path</a></code>. Returns <code><a class="el" href="group__group__errors.html#ga3b10a68f354f39cbb0fe0d043ad4c7c0" title="The soap_status code for no error (zero) ">SOAP_OK</a></code> or a <code><a class="el" href="group__group__errors.html#gac0eadf8f72bacb5b41b750beaeca0444" title="Status and error codes are int values, a zero value or SOAP_OK (0) means no error, nonzero means error. ">soap_status</a></code> error code.</p>
<p>To enable HTTP cookies, the engine must be compiled with <code><a class="el" href="group__group__with.html#ga77f061a12d88eb8b7dae8b07cf90e29d" title="When this macro is defined at compile time (undefined by default), HTTP cookie support is enabled in ...">WITH_COOKIES</a></code>.</p>
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="structsoap.html#af2ecfbae740da7839a0c5c96eb65db2a" title="User-definable string that specifies the HTTP cookie domain of the running server. ">soap::cookie_domain</a></code>, <code><a class="el" href="structsoap.html#afdd91ce1189fedd32ebfa51dd6ed33eb" title="User-definable string that specifies the HTTP cookie path of the running server. ">soap::cookie_path</a></code>.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd><code><a class="el" href="group__group__errors.html#ga3b10a68f354f39cbb0fe0d043ad4c7c0" title="The soap_status code for no error (zero) ">SOAP_OK</a></code> or a <code><a class="el" href="group__group__errors.html#gac0eadf8f72bacb5b41b750beaeca0444" title="Status and error codes are int values, a zero value or SOAP_OK (0) means no error, nonzero means error. ">soap_status</a></code> error code </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">soap</td><td><code><a class="el" href="structsoap.html" title="Context with the engine state. ">soap</a></code> context </td></tr>
    <tr><td class="paramname">name</td><td>cookie name </td></tr>
    <tr><td class="paramname">domain</td><td>cookie domain or NULL </td></tr>
    <tr><td class="paramname">path</td><td>cookie path or NULL </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga5f7d712b3d1c7c2a09741aa45621dfb5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int soap_set_cookie_session </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structsoap.html">soap</a> *&#160;</td>
          <td class="paramname"><em>soap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>domain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set session cookie. </p>
<p>This function makes the specified cookie <code>name</code> a "session cookie" and updates the cookie store at the server side by marking the cookie as a session cookie. This means that the cookie will be sent to clients that connect to the server. This function is not needed when a cookie is modified with <code><a class="el" href="group__group__cookies.html#gae22594f7ccdd5476bcdd93626b3006ef" title="Set cookie expiration. ">soap_set_cookie_expire</a></code>, for example, because modified cookies are always sent back to the client. The <code>domain</code> and <code>path</code> parameters can be specified or can be NULL to use the current domain and path given by <code><a class="el" href="structsoap.html#af2ecfbae740da7839a0c5c96eb65db2a" title="User-definable string that specifies the HTTP cookie domain of the running server. ">soap::cookie_domain</a></code> and <code><a class="el" href="structsoap.html#afdd91ce1189fedd32ebfa51dd6ed33eb" title="User-definable string that specifies the HTTP cookie path of the running server. ">soap::cookie_path</a></code>. Returns <code><a class="el" href="group__group__errors.html#ga3b10a68f354f39cbb0fe0d043ad4c7c0" title="The soap_status code for no error (zero) ">SOAP_OK</a></code> or a <code><a class="el" href="group__group__errors.html#gac0eadf8f72bacb5b41b750beaeca0444" title="Status and error codes are int values, a zero value or SOAP_OK (0) means no error, nonzero means error. ">soap_status</a></code> error code.</p>
<p>To enable HTTP cookies, the engine must be compiled with <code><a class="el" href="group__group__with.html#ga77f061a12d88eb8b7dae8b07cf90e29d" title="When this macro is defined at compile time (undefined by default), HTTP cookie support is enabled in ...">WITH_COOKIES</a></code>.</p>
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="structsoap.html#af2ecfbae740da7839a0c5c96eb65db2a" title="User-definable string that specifies the HTTP cookie domain of the running server. ">soap::cookie_domain</a></code>, <code><a class="el" href="structsoap.html#afdd91ce1189fedd32ebfa51dd6ed33eb" title="User-definable string that specifies the HTTP cookie path of the running server. ">soap::cookie_path</a></code>.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd><code><a class="el" href="group__group__errors.html#ga3b10a68f354f39cbb0fe0d043ad4c7c0" title="The soap_status code for no error (zero) ">SOAP_OK</a></code> or a <code><a class="el" href="group__group__errors.html#gac0eadf8f72bacb5b41b750beaeca0444" title="Status and error codes are int values, a zero value or SOAP_OK (0) means no error, nonzero means error. ">soap_status</a></code> error code </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">soap</td><td><code><a class="el" href="structsoap.html" title="Context with the engine state. ">soap</a></code> context </td></tr>
    <tr><td class="paramname">name</td><td>cookie name </td></tr>
    <tr><td class="paramname">domain</td><td>cookie domain or NULL </td></tr>
    <tr><td class="paramname">path</td><td>cookie path or NULL </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<hr class="footer">
<address class="footer">
Copyright (C) 2021, Robert van Engelen, Genivia Inc., All Rights Reserved.
</address>
<address class="footer"><small>
Converted on Tue Apr 20 2021 19:48:13 by <a target="_blank" href="http://www.doxygen.org/index.html">Doxygen</a> 1.8.11</small></address>
<br>
<div style="height: 246px; background: #DBDBDB;">
</body>
</html>
